#pragma once

#include "stdafx.h"
#include "resource.h"

#define WM_APP_TRAYCALLBACK (WM_APP + 1)

class CMyResources
{
public:
    static LPWSTR GetAppTitle();
    static LPWSTR GetStartQuestion();
    static HMENU GetTrayMenu();
};

class CMyAppMutex
{
private:
    BOOL m_Success;
    HANDLE m_hAppMutex;

public:
    CMyAppMutex();
    ~CMyAppMutex();
    BOOL Success() { return m_Success; }
};

class CMyTrayIcon
{
private:
    BOOL m_Success;
    HWND m_hWnd;

public:
    CMyTrayIcon(HWND);
    ~CMyTrayIcon();
    BOOL Success() { return m_Success; }
};

class CMyApp
{
private:
    BOOL m_Success;
    CMyAppMutex* m_cAppMutex;
    HWND m_hWnd;
    CMyTrayIcon* m_cTrayIcon;

private:
    ATOM MyRegisterClass();
    HWND MyCreateWindow();

public:
    CMyApp();
    ~CMyApp();
    BOOL Success() { return m_Success; }
};

class CMyAppStartup
{
public:
    static BOOL DoesAppStartWhenWindowsStarts();
    static void SetAppStartsWhenWindowsStarts();
};

extern HINSTANCE g_hInst;

LRESULT CALLBACK AppWndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK AboutDlgProc(HWND, UINT, WPARAM, LPARAM);
